<div class="wrapper-md">
    <!-- 选择框  编辑组件时 选择组件 -->
    <div ng-if="info.showSelect">
        <table>
            <tr>
                <td>
                    <ui-select ng-model="info.selectInfo" ng-change="selectChange()" style="width:300px;">
                        <ui-select-match placeholder="搜索...">{{$select.selected.value}}</ui-select-match>
                        <ui-select-choices repeat="x in info.selectData | filter: $select.search|limitTo:15">
                            <span ng-bind-html="x.key | highlight: $select.search"></span>
                        </ui-select-choices>
                    </ui-select>
                    <!-- <winit-select modeldata="info.type" on-init="true" optiondata="value" optiondata-value="key"
                        datalist="info.selectData" fon-change="selectChange(info);"></winit-select> -->
                </td>
                <td style="padding-left: 10px;">
                    <input ng-model="info.newType" placeholder="请输入新增组件名称" />
                    <i class="icon-plus" style="margin-left: 10px;" popover="新增组件" popover-trigger="mouseenter" role="button" tabindex="0" ng-click="addType()"></i>
                </td>
            </tr>
        </table>
        <br>
    </div>


    <table class="table table-bordered table-hover table-condensed bg-white-only">
        <tr style="font-weight: bold">
            <td style="width:35%">key</td>
            <td style="width:20%">value</td>
            <td style="width:20%">index</td>
            <td style="width:25%">Edit</td>
        </tr>
        <tr ng-repeat="config in info.configList">
            <td class="v-middle">
                <span editable-text="config.key" e-name="key" e-form="rowform" onbeforesave="check($data);" e-required>
                    {{ config.key || 'empty' }}
                </span>
            </td>
            <td class="v-middle">
                <span editable-text="config.value" e-name="value" e-form="rowform" onbeforesave="check($data);" e-required>
                    {{ config.value || 'empty' }}
                </span>
            </td>
            <td class="v-middle">
                <span editable-text="config.index" e-name="index" e-form="rowform" onbeforesave="check($data);" e-required>
                    {{ config.index || 'empty' }}
                </span>
            </td>
            <td style="white-space: nowrap">
                <form editable-form name="rowform" onaftersave="save()" ng-show="rowform.$visible" class="form-buttons form-inline" shown="inserted == config">
                    <button type="submit" ng-disabled="rowform.$waiting" class="btn btn-sm btn-info">
                        save
                    </button>
                    <button type="button" ng-disabled="rowform.$waiting" ng-click="rowform.$cancel()" class="btn btn-sm btn-default">
                        cancel
                    </button>
                </form>
                <div class="buttons" ng-show="!rowform.$visible">
                    <button class="btn btn-sm btn-info" ng-click="rowform.$show()">edit</button>
                    <button class="btn btn-sm btn-danger" ng-click="remove($index)">del</button>
                </div>
            </td>
        </tr>
    </table>
</div>
<winit-settings btn-list="settings.btnEle" ></winit-settings>